StoredLearningSession.Suspend Method

Temporarily suspends the the current session. It may be resumed at a later time.

Parent Type: StoredLearningSession

Namespace: Microsoft.LearningComponents.Storage

Assembly: Microsoft.LearningComponents.Storage.dll

Syntax
C#

public override void Suspend ()

Exceptions
Exception type Condition
InvalidOperationException

Thrown if the session is not in the appropriate state to be suspended.

Remarks

This method does not save changes that result from suspending the session. The application should call CommitChanges after this method and prior to disposing the object to ensure changes are persisted.

It may not be valid to call this method based on the state of the session. Call IsSuspendValid before calling this method to determine if this method is likely to succeed.